package com.example.othree.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.othree.entity.CropsAnalysYear;
import com.example.othree.entity.CropsAnalysYearVo;
import com.example.othree.mapper.CropsAnalysYearMapper;
import com.example.othree.service.CropsAnalysYearService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zogran
 * @since 2024-12-13
 */
@Service
public class CropsAnalysYearServiceImpl extends ServiceImpl<CropsAnalysYearMapper, CropsAnalysYear> implements CropsAnalysYearService {

    @Autowired
    private CropsAnalysYearMapper cropsAnalysYearMapper;

    @Override
    public IPage PageList(Page<CropsAnalysYear> page, LambdaQueryWrapper<CropsAnalysYear> lambdaQueryWrapper) {
        return cropsAnalysYearMapper.selectPage(page, lambdaQueryWrapper);
    }

    @Override
    public List<CropsAnalysYearVo> cropsaAnalysYear(String year, String city, String crop) {
        return cropsAnalysYearMapper.cropsAnalysYearMapper(year, city, crop);
    }
}
